<div class="row">
  <div id="breadcrumb" class="col-md-12">
    <ol class="breadcrumb">
      <li><a ui-sref="layout.main">主页</a></li>
      <li><a ui-sref="layout.list.classes">班级列表</a></li>
      <li><a href="javascript:;">添加班级</a></li>
    </ol>
  </div>
</div>
<div class="well" style="background-color: #FFFFFF;">
  <div class="row">
    <div class="col-xs-12">
      <h3>新添班级</h3>
    </div>
  </div>
  <hr />
  <div class="row">
    <div class="col-xs-12">
      <form class="form-horizontal">
        <div class="form-group">
          <label class="col-sm-2 control-label">编号</label>
          <div class="col-sm-10">
            <input type="text" ng-model="classesItem.id" class="form-control" ng-disabled="true">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">班级名称</label>
          <div class="col-sm-10">
            <input type="text" ng-model="classesItem.classes_name" class="form-control" ng-disabled="update">
          </div>
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">所属专业</label>
          <div class="col-sm-10">
            <!-- <input type="text" ng-model="user.usr_classes" class="form-control" ng-disabled="update"> -->
            <ui-select ng-model="classesItem.major_id" theme="select2" ng-disabled="update" style="min-width: 100%;">
              <ui-select-match>
                {{$select.selected.major_name}}
              </ui-select-match>
              <ui-select-choices repeat="majorItem.id as majorItem in major | filter : {major_name : $select.search}">
                <div ng-bind-html="majorItem.major_name | highlight: $select.search"></div>
                <!--
                <small>
                  email: {{person.email}}
                  age: <span ng-bind-html="''+person.age | highlight: $select.search"></span>
                </small>
                -->
              </ui-select-choices>
            </ui-select>
          </div>
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">班级简介</label>
          <div class="col-sm-10">
            <input type="text" ng-model="classesItem.classes_desc" class="form-control" ng-disabled="update">
          </div>
        </div>
        <div class="form-group">
          <div class="col-xs-2"></div>
          <div class="col-xs-2">
            <button class="btn btn-block btn-success" ng-click="add()" ng-if="!update">确认添加</button>
          </div>
          <div class="col-xs-2">
            <input class="btn btn-block btn-danger" ng-click="back()" type="button" ng-if="!update" value="取消" />
          </div>
        </div>
      </form>
    </div>
  </div>
</div>